<template>
  <el-config-provider :locale="localeStore.language == 'zh' ? zh : en">
    <router-view />
  </el-config-provider>
</template>

<script setup>
import zh from "element-plus/es/locale/lang/zh-cn";
import en from "element-plus/es/locale/lang/en";
import { useLocaleStore } from '@/stores/locale'
import { onMounted } from 'vue'

const localeStore = useLocaleStore()
onMounted(() => {
  localeStore.getLocaleLanguage()
})
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  margin: 0;
  padding: 0;
}
</style>
